﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CSharpDay06__MVC_with_User_Input_.Models
{
    public abstract class Shape
    {
        public int Id { get; set; }
        public abstract double GetArea();
        public virtual string SayShape()
        {
            return "I am a shape!";
        }
    }
    public class Rectangle : Shape
    {
        public int Length { get; set; }
        public int Width { get; set; }

        public override double GetArea()
        {
            return this.Length * this.Width;
        }
        public override string SayShape()
        {
            return "I am a Rectangle!";
        }
    }
    public class Triangle : Shape
    {
        public int Base { get; set; }
        public int Height { get; set; }

        public override double GetArea()
        {
            return .5 * this.Base * this.Height;
        }
    }
    public class Circle : Shape
    {
        public double Radius { get; set; }
        public override double GetArea()
        {
            throw new NotImplementedException();
        }
    }
}